const readlineSync=require("readline-sync")
var num=readlineSync.question("input num=")
var ch="零一二三四五六七八九".split("");
var qian=num.charAt(0);
var bai =num.charAt(1);
var shi =num.charAt(2);
var ge  =num.charAt(3);
var zi =`${ch[qian]}千${ch[bai]}百${ch[shi]}十${ch[ge]}`;
 zi=zi.replace("零百","零");
 zi=zi.replace("零十","零");
 zi=zi.replace("零零","零");
 zi=zi.replace("零零","零");
 if(zi.endsWith("零"))
 zi=zi.substring(0,zi.length-1);

console.log(zi)